#137 - feat: add search functionality and restore selection in Hierarchy component#129
Merged
#137 - feat: add search functionality and restore selection in Hierarchy component#129
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds search functionality and selection restoration to the Hierarchy component by implementing term highlighting and visual feedback in the tree view. The changes enable users to search for terms within the hierarchy tree and restore their previous selection state.
Key changes:
- Added search highlighting functionality with visual match indicators
- Implemented selection state restoration before/after search operations
- Enhanced tree view with hover actions for leaf nodes to open terms in new tabs
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| CustomizedTreeView.jsx | Enhanced tree component with search highlighting, hover actions, and improved expansion logic |
| OverView.jsx | Fixed error handling to properly reset loading state when predicate fetching fails |
| Hierarchy.jsx | Added search functionality, selection restoration, and improved button behaviors |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ddelpiano
approved these changes
Sep 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to the hierarchy tree component and its integration, focusing on enhanced search/filtering, better navigation and selection handling, and improved user experience through visual feedback and actions. The changes are mainly in
Hierarchy.jsxandCustomizedTreeView.jsx, with supporting updates in related files.Hierarchy filtering and navigation enhancements:
collectMatchingIdsfunction to support filtering tree items by id, label, or IRI, enabling search highlights within the hierarchy tree.Hierarchyto remember the initial selected term, track pre-search selection, and provide "Refresh" and "Aim" buttons for restoring and focusing hierarchy states. [1] [2]User interface and experience improvements:
CustomizedTreeView: added visual chips for "Current Item" and "Match", and introduced a hover action to open leaf nodes in a new tab.Bug fix:
setLoadingPredicates(false)is called on error inOverView.jsx.